dojo.declare("MVendorHomePg", wm.Page, {
start: function() {
},
"preferredDevice": "phone",
tbLogoutClick: function(inSender) {
this.nclLogout.update();
var mainPage = wm.Page.getPage("MobileMainPg");
mainPage.vLoginCount = mainPage.vLoginCount + 1;
wm.Page.getPage("MobileMainPg").ncLoginPg.update();
},
backClick: function(inSender) {
if (this.vPageBack === 'NEW_ORDERS') {
this.layerOrderToday.activate();
wm.Page.getPage("MVendorOrderCurrentPg").layerOrder.activate();
}
//svUpdateOrderStatus
if (this.vPageBack === 'NEW_ORDERS_ITEMS') {
if (wm.Page.getPage("MVendorOrderCurrentPg")) {
//    console.error(wm.Page.getPage("MVendorOrderCurrentPg").listCurrentOrders.selectedItem);
//var orderId = wm.Page.getPage("MVendorOrderCurrentPg").listCurrentOrders.selectedItem.data.orderId;
//wm.Page.getPage("MVendorOrderCurrentPg").svUpdateOrderStatus.input.setValue("orderId", orderId);
//wm.Page.getPage("MVendorOrderCurrentPg").svUpdateOrderStatus.update();
}
this.layerOrderToday.activate();
wm.Page.getPage("MVendorOrderCurrentPg").layerOrder.activate();
}
if (this.vPageBack === 'ORDER_HISTORY') {
this.layerOrderHistory.activate();
wm.Page.getPage("MVendorOrderHistoryPg").layerOrder.activate();
}
if (this.vPageBack === 'ITEMS') {
this.layerMenuItems.activate();
}
if (this.vPageBack === 'VENDOR_ACCOUNT') {
this.layerMyAccount.activate();
}
},
tbServicesClick1: function(inSender) {
this.vPageBack = 'NEW_ORDERS';
},
tbOrderHistoryClick1: function(inSender) {
this.vPageBack = 'ORDER_HISTORY';
if (wm.Page.getPage("MVendorOrderHistoryPg")) {
wm.Page.getPage("MVendorOrderHistoryPg").svVendorOrderHistory.update();
}
},
tbPastOrdersClick1: function(inSender) {
this.vPageBack = 'ITEMS';
},
tbUpdateAccountClick1: function(inSender) {
this.vPageBack = 'VENDOR_ACCOUNT';
},
_end: 0
});

MVendorHomePg.widgets = {
vPageBack: ["wm.Variable", {"type":"StringData"}, {}],
nclLogout: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"You have been logged out\"","targetProperty":"text"}, {}],
wire1: ["wm.Wire", {"expression":"2000","targetProperty":"duration"}, {}],
wire2: ["wm.Wire", {"expression":"\"Success\"","targetProperty":"cssClasses"}, {}],
wire3: ["wm.Wire", {"expression":"\"center center\"","targetProperty":"dialogPosition"}, {}]
}]
}]
}],
ncLogout: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"You have been logged Out\"","targetProperty":"text"}, {}],
wire1: ["wm.Wire", {"expression":"2000","targetProperty":"duration"}, {}],
wire2: ["wm.Wire", {"expression":"\"Success\"","targetProperty":"cssClasses"}, {}],
wire3: ["wm.Wire", {"expression":"\"center center\"","targetProperty":"dialogPosition"}, {}]
}]
}]
}],
ncLogoutConfirm: ["wm.NotificationCall", {"operation":"confirm"}, {"onOk":"tbLogoutClick"}, {
input: ["wm.ServiceInput", {"type":"confirmInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"Do you want to log out ?\"","targetProperty":"text"}, {}],
wire1: ["wm.Wire", {"expression":"\"Yes\"","targetProperty":"OKButtonText"}, {}],
wire2: ["wm.Wire", {"expression":"\"No\"","targetProperty":"CancelButtonText"}, {}]
}]
}]
}],
layoutBox: ["wm.Layout", {"horizontalAlign":"left","styles":{"backgroundImage":"resources/images/mobile/background_m.jpg"},"verticalAlign":"top"}, {}, {
panel5: ["wm.Panel", {"borderColor":"#e61818","height":"45px","horizontalAlign":"left","layoutKind":"left-to-right","styles":{},"verticalAlign":"middle","width":"100%"}, {}, {
picture5: ["wm.Picture", {"aspect":"v","height":"38px","source":"resources/images/mobile/h2m_back.png","styles":{},"width":"70px"}, {"onclick":"backClick"}],
panel7: ["wm.Panel", {"height":"100%","horizontalAlign":"left","verticalAlign":"top","width":"100%"}, {}, {
picture6: ["wm.Picture", {"aspect":"v","height":"100%","source":"resources/images/mobile/h2m_header_sub.png","styles":{},"width":"190px"}, {}]
}],
panel6: ["wm.Panel", {"height":"35px","horizontalAlign":"right","verticalAlign":"top","width":"50px"}, {}, {
picture7: ["wm.Picture", {"aspect":"h","height":"100%","source":"resources/images/mobile/logout.jpg","styles":{},"width":"50px"}, {"onclick":"ncLogoutConfirm"}]
}]
}],
breadcrumbLayers1: ["wm.Layers", {"border":"0,0,1,0","borderColor":"#888888","clientBorderColor":"#ffffff","defaultLayer":0,"minDesktopHeight":250,"minHeight":250,"styles":{},"transition":"fade"}, {}, {
layerOrderToday: ["wm.Layer", {"borderColor":"#ffffff","caption":"Today's Orders","horizontalAlign":"left","themeStyleType":"ContentPanel","verticalAlign":"top"}, {}, {
pcCurrentOrders: ["wm.PageContainer", {"deferLoad":true,"pageName":"MVendorOrderCurrentPg","styles":{},"subpageEventlist":{},"subpageMethodlist":{},"subpageProplist":{}}, {}]
}],
layerOrderHistory: ["wm.Layer", {"borderColor":"#ffffff","caption":"Today's Orders","horizontalAlign":"left","themeStyleType":"ContentPanel","verticalAlign":"top"}, {}, {
pcOrderHistory: ["wm.PageContainer", {"deferLoad":true,"pageName":"MVendorOrderHistoryPg","subpageEventlist":{},"subpageMethodlist":{},"subpageProplist":{}}, {}]
}],
layerMenuItems: ["wm.Layer", {"borderColor":"#ffffff","caption":"Product Catalog ","horizontalAlign":"left","themeStyleType":"ContentPanel","verticalAlign":"top"}, {}, {
pcmenuItems: ["wm.PageContainer", {"deferLoad":true,"pageName":"MVendorProductCatalogsPg","subpageEventlist":{},"subpageMethodlist":{},"subpageProplist":{}}, {}]
}],
layerMyAccount: ["wm.Layer", {"borderColor":"#ffffff","caption":"layer1","horizontalAlign":"left","themeStyleType":"ContentPanel","verticalAlign":"top"}, {}, {
panelServicesList2: ["wm.Panel", {"height":"100%","horizontalAlign":"center","layoutKind":"left-to-right","verticalAlign":"top","width":"100%"}, {}, {
pageContainer4: ["wm.PageContainer", {"deferLoad":true,"pageName":"MVendorAccountPg","subpageEventlist":{},"subpageMethodlist":{},"subpageProplist":{}}, {}]
}]
}]
}],
panelNavigation: ["wm.Panel", {"height":"42px","horizontalAlign":"left","layoutKind":"left-to-right","styles":{},"verticalAlign":"top","width":"100%"}, {}, {
toggleButtonPanel1: ["wm.ToggleButtonPanel", {"borderColor":"","buttonBorder":"0,0,0,0","buttonMargins":"1","desktopHeight":"35px","height":"38px","horizontalAlign":"center","mobileHeight":"38px","styles":{},"verticalAlign":"top"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"tbServices","targetProperty":"currentButton"}, {}]
}],
tbServices: ["wm.Button", {"border":"0,0,0,0","caption":"New Orders","height":"100%","imageIndex":58,"imageList":"app.silkIconList","styles":{},"width":"100%"}, {"onclick":"layerOrderToday","onclick1":"tbServicesClick1"}],
tbOrderHistory: ["wm.Button", {"border":"0,0,0,0","caption":"Order History","height":"100%","iconHeight":"14px","iconMargin":"0 0 0 0","iconWidth":"14px","imageIndex":82,"imageList":"app.silkIconList","width":"100%"}, {"onclick":"layerOrderHistory","onclick1":"tbOrderHistoryClick1"}],
tbPastOrders: ["wm.Button", {"border":"0,0,0,0","caption":"Items","height":"100%","imageIndex":71,"imageList":"app.silkIconList","width":"55px"}, {"onclick":"layerMenuItems","onclick1":"tbPastOrdersClick1"}],
tbUpdateAccount: ["wm.Button", {"border":"0","caption":"Account","height":"100%","imageIndex":54,"imageList":"app.silkIconList","width":"70px"}, {"onclick":"layerMyAccount","onclick1":"tbUpdateAccountClick1"}]
}]
}]
}]
};

MVendorHomePg.prototype._cssText = '';
MVendorHomePg.prototype._htmlText = '';